package com.njqy.ticket.service.common.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.njqy.ticket.entity.common.MenuEntity;
import com.njqy.ticket.mapper.common.MenuMapper;
import com.njqy.ticket.service.common.IMenuService;
import com.njqy.ticket.service.common.IRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MenuServiceImpl extends ServiceImpl<MenuMapper, MenuEntity> implements IMenuService {


    @Override
    public List<String> getMenu(String username) {
        return this.getBaseMapper().selectMenuKeyByUser(username);
    }

    @Override
    public List<String> getMenu() {
        return this.getBaseMapper().selectAllMenuKey();
    }
}
